import java.util.Scanner;
public class Student {
    Scanner in = new Scanner(System.in);
    int all = 0;
    int bingo = 0;
    public void Answer(StringBuffer que) throws Exception {
        String an = null;
        Calculator c = new Calculator(que);
        System.out.print(que+" = ");
        c.jisuan();
        an = in.next();
        if (an.equals(c.result.toString())){
            System.out.println("正确！");
            all++;
            bingo++;
            return;
        }
        else {
            System.out.println("错误！正确答案："+c.result.toString());
            all++;
            return;
        }
    }
    public float getPro(){
        float Pro = (float)bingo/(float)all;
        return Pro;
    }


}
